﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using System.Windows.Navigation;

//using SmartHYU_TestVersion.Life;

namespace SmartHYU_TestVersion.Life
{
    public partial class HYUbobDetail : PhoneApplicationPage
    {
        HYUbob bob = new HYUbob();
        List<SimpleBobInfo> bobInfos = new List<SimpleBobInfo>();

        public HYUbobDetail()
        {
            InitializeComponent();

        }

        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            string selectedDay = "";
            if (NavigationContext.QueryString.TryGetValue("day", out selectedDay))
            {
                int day = int.Parse(selectedDay);

                bob.ParseXmlFromIsolatedStorage();

                bobInfos = bob.GetSimpleBobInfoListFromDay(day);

                bobInfoListBox.ItemsSource = bobInfos;
            }
        }
    }
}